import getlink from "@/api/getapi.js"

let details = {
    state:{
        arr:[]
    },
    mutations:{
        setarr(state,payload){
            state.arr = payload
        }
    },
    actions:{
        getDetails(context){
            getlink("/mock/data/news").then((ok)=>{
                console.log(ok);
                context.commit("setarr",ok.data.data)
            }).catch((err)=>{
                console.log(err);
            })
        }
    }
}

export default details